//
//  PictureCollectionCell.m
//  广协汇
//
//  Created by gxh on 2016/11/11.
//  Copyright © 2016年 广协汇. All rights reserved.
//

#import "PictureCollectionCell.h"
#import "BrowseZoomScrollView.h"



@interface PictureCollectionCell()<UIActionSheetDelegate>


@property (nonatomic,strong) UIButton *downBtn;

@property (nonatomic,strong) BrowseZoomScrollView *scrollV;
@end
@implementation PictureCollectionCell



- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        _scrollV = [[BrowseZoomScrollView alloc]initWithFrame:self.bounds];
        WeakSelf
        _scrollV.tapBlock = ^(){
            //因为自己被scrollv挡住了，不能直接调用collection代理
            if (weakSelf.tapBlock) {
                weakSelf.tapBlock();
            }
        };
      
        [self.contentView addSubview:_scrollV];

        
        
        
        UIImageView *imagev = [[UIImageView alloc]initWithFrame:self.bounds];
        _imageV = imagev;
        _imageV.contentMode = UIViewContentModeScaleAspectFit;
        _imageV.userInteractionEnabled = YES;

        _imageV.clipsToBounds = YES;
        _scrollV.zoomImageView = imagev;
        [self.scrollV addSubview:imagev];
        
        
        
       

    }
    return self;
}



//设置图片
- (void)setImageSource:(id)imageSource
{
    _imageSource = imageSource;
    
    if ([imageSource isKindOfClass:[UIImage class]]) {
        
        self.imageV.image = imageSource;
    }
    
   
}

#pragma -保存图片



@end
